//
//  IViewController.m
//  KnowEveryThings
//
//  Created by lanou3g on 16/5/5.
//  Copyright © 2016年 王玲. All rights reserved.
//

#import "IViewController.h"
#import "UIImage+image.h"

@interface IViewController ()<UITableViewDataSource,UITableViewDelegate>

@property(nonatomic,strong)UITableView *tableView;

///我里面的列表
@property(nonatomic,strong)NSMutableArray *listArr;

@end

@implementation IViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setUpNavigation];
    self.listArr = [[NSMutableArray alloc] init];
    self.tableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:(UITableViewStylePlain)];
    [self.view addSubview:self.tableView];
    
   }


///设置navigationItem
- (void)setUpNavigation{
    self.title = @"我";
    UIBarButtonItem *imageItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageWithOriginaName:@"setting.png"] style:(UIBarButtonItemStylePlain) target:self action:@selector(setting)];
    //   UIBarButtonItem *titleItem  = [[UIBarButtonItem alloc] initWithTitle:@"设置" style:(UIBarButtonItemStylePlain) target:self action:@selector(setting)];
    //    self.navigationItem.rightBarButtonItems = @[imageItem,titleItem];
    self.navigationItem.rightBarButtonItem = imageItem;

}

- (void)setting{
    
}

#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.listArr.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:@"cell"];
    }
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}



@end
